// 2.查询国家下的城市
$(function() {
	var search = location.search;
	var country_id='';
	if (search==null) {
		country_id='0';
	}else{
		country_id = search.split("=")[1];
	}
	var name = search.substring(1,8);
	if(country_id != "0" && country_id != null){// 0表示全选
		// 显示所有的城市
		$.get("/JavaWeb项目_第六组/hotel", {country_id,method:"findCity"}, function(data) {
		var lis ='';
		$("#allCity").css("display","blok");//显示城市的div
		$("#idea").css("display","blok");//同时显示已选择向
		console.log(search);
		// 不显示选中的城市
		$("#showCity").css("display","none");//隐藏li
		for (var i = 0; i < data.length; i++) {
		var li ='<li><a href="travel_Store_jd.jsp?city_id='+data[i].city_id+'" data-bn-ipg="zsj-list-freedomtravel-cd2" class="SxIzBNt35cIvti5M0JRUX">'+data[i].city_name+'</a></li>';
		lis += li;										 
		}
		// 直接显示城市数据
		$("#city").html(lis);
	});
	}else{
		$("#allCity").css("display","none");//隐藏城市的div
		$("#idea").css("display","none");//同时不显示已选择向
	}
});
